import type { AppRouteModule } from '/@/router/types';

import { getParentLayout, LAYOUT } from '/@/router/constant';
const system: AppRouteModule = {
  path: '/system',
  name: 'System',
  component: LAYOUT,
  redirect: '/system/menu',
  meta: {
    orderNo: 13,
    icon: 'ant-design:setting-twotone',
    title: '基础管理',
  },
  children: [
    {
      path: 'menu',
      name: 'MenuPage',
      component: () => import('/@/views/backs/system/menu/index.vue'),
      meta: {
        // affix: true,
        title: '菜单',
      },
    },
    {
      path: 'users',
      name: 'UsersPage',
      component: () => import('/@/views/backs/system/users/index.vue'),
      meta: {
        // affix: true,
        title: '用户',
      },
    },
    {
      path: 'role',
      name: 'RolePage',
      component: () => import('/@/views/backs/system/role/index.vue'),
      meta: {
        // affix: true,
        title: '角色',
      },
    },
    {
      path: 'post',
      name: 'PostPage',
      component: () => import('/@/views/backs/system/post/index.vue'),
      meta: {
        // affix: true,
        title: '岗位',
      },
    },
    {
      path: 'dept',
      name: 'DeptPage',
      component: () => import('/@/views/backs/system/dept/index.vue'),
      meta: {
        // affix: true,
        title: '部门',
      },
    },
    {
      path: 'information',
      name: 'InformationPage',
      component: () => import('/@/views/backs/system/information/index.vue'),
      meta: {
        // affix: true,
        title: '员工',
      },
    },
    {
      path: 'oauth',
      name: 'oauthPage',
      // component: () => import('/@/views/backs/system/oauth/index.vue'),
      component: getParentLayout('oauth'),
      meta: {
        title: 'OAuth2.0',
      },
      children: [
        {
          path: 'app',
          name: 'appPage',
          component: () => import('/@/views/backs/system/oauth/app/index.vue'),
          meta: {
            title: '应用管理',
          },
        },
        {
          path: 'token',
          name: 'tokenPage',
          component: () => import('/@/views/backs/system/oauth/token/index.vue'),
          meta: {
            title: '令牌管理',
          },
        },
      ],
    },
  ],
};

export default system;
